﻿@model Hotel.Web.Models.RoomOrder
@using Hotel.Web.Models
@{
    ViewBag.Title = Hotel.Web.Views.OrderRoom.RoomOrder.OrderRoom;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    @Hotel.Web.Views.OrderRoom.RoomOrder.Greeting</h2>
@Html.ValidationSummary(true, Hotel.Web.Views.OrderRoom.RoomOrder.ErrorSummary)
@using (Html.BeginForm())
{
    <fieldset>
        <legend>@Hotel.Web.Views.OrderRoom.RoomOrder.OrderRoom</legend>
        <br />
        @Html.LabelFor(model => model.InDate)<br />
        @Html.EditorFor(model => model.InDate)
        @Html.ValidationMessageFor(model => model.InDate)<br />
        <br />
        @Html.LabelFor(model => model.OutDate)<br />
        @Html.EditorFor(model => model.OutDate)
        @Html.ValidationMessageFor(model => model.OutDate)
        <br />
        <br />
        @Html.LabelFor(model => model.RoomType)<br />
        @Html.DropDownList("RoomType", new SelectList(new[] { @Hotel.Web.Views.OrderRoom.RoomOrder.Standart, @Hotel.Web.Views.OrderRoom.RoomOrder.SemiSuit, @Hotel.Web.Views.OrderRoom.RoomOrder.Suit }))
        <br />
        <br />
        @Html.LabelFor(model => model.ContactInformation.FName)<br />
        @Html.EditorFor(model => model.ContactInformation.FName)
        @Html.ValidationMessageFor(model => model.ContactInformation.FName)<br />
        <br />
        @Html.LabelFor(model => model.ContactInformation.LName)<br />
        @Html.EditorFor(model => model.ContactInformation.LName)
        @Html.ValidationMessageFor(model => model.ContactInformation.LName)<br />
        <br />
        <table id='t1' border="2" frame="box">
            <tr>
                <td>
                    @Html.LabelFor(model => model.ContactInformation.Contacts.Phone)<br />
                    @Html.EditorFor(model => model.ContactInformation.Contacts.Phone)
                    @Html.ValidationMessageFor(model => model.ContactInformation.Contacts.Phone)<br />
                    <br />
                    @Html.LabelFor(model => model.ContactInformation.Contacts.EMail)<br />
                    @Html.EditorFor(model => model.ContactInformation.Contacts.EMail)
                    @Html.ValidationMessageFor(model => model.ContactInformation.Contacts.EMail)<br />
                    <br />
                </td>
            </tr>
        </table>
        @Html.LabelFor(model => model.NumberOfPeople)<br />
        @Html.EditorFor(model => model.NumberOfPeople)
        @Html.ValidationMessageFor(model => model.NumberOfPeople)<br />
        <br />
        @Html.LabelFor(model => model.RoomNum)<br />
        @Html.EditorFor(model => model.RoomNum)
        @Html.ValidationMessageFor(model => model.RoomNum)<br />
        <br />
    </fieldset>
       
    <p />
    <input type="submit" value="@Hotel.Web.Views.OrderRoom.RoomOrder.Submit" />
}
<div>
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
</div>
<script type="text/javascript" src="../../Scripts/jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.11.js"></script>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $('#InDate').datepicker({ minDate: "0", maxDate: "+1m +1w +3d", showMonthAfterYear: true, altFormat: "yy-mm-dd", dateFormat: "yy-mm-dd", duration: "fast" });
        //Минимальная дата сегодня.
        //Максимальная дата + 1 месяц, 1 неделя, и 3 дня от "сейчас" 
        $('#OutDate').datepicker({ minDate: "1", maxDate: "+3m +1w +3d", showMonthAfterYear: true, altFormat: "yy-mm-dd", dateFormat: "yy-mm-dd", duration: "fast" });
    });
</script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
